{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "工作中经常会在Windows、MAC、Linux系统中切换，而每个系统默认的shell都不一样，微软发发布的工具Powershell支持在三个系统中使用。所以就想把MAC中的默认打开端调用的shell改为PowerShell。  \n",
    "\n",
    "MAC默认 shell 是 zsh。你可以更改新的“终端”窗口和标签页打开时使用的 shell。  \n",
    "在 Mac 上的“终端” App  中，选取“终端”>“设置”，然后点按“通用”。   \n",
    "在“Shell 的打开方式”旁边，选择“命令（完整的路径）”，然后输入你想要使用的 shell 的完整路径。  \n",
    "![截图](img/1.png \"截图 \")\n",
    "\n",
    "更换前需要找到pwsh的安装位置\n",
    "在命令行下执行以下命令即可：\n",
    "` $pshome`\n",
    "`/usr/local/microsoft/powershell/7/pwsh`\n",
    "\n",
    "在联网环境中，系统管理员可以指定默认 shell。有关每个 shell 功能的更多信息，请输入“man”和 shell 的名称。\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "dotnet_interactive": {
     "language": "pwsh"
    },
    "polyglot_notebook": {
     "kernelName": "pwsh"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/Users/anshaofeng/.nuget/packages/microsoft.dotnet-interactive/1.0.410202/tools/net7.0/any/runtimes/unix/lib/net7.0\n"
     ]
    }
   ],
   "source": [
    "$pshome"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".NET (C#)",
   "language": "C#",
   "name": ".net-csharp"
  },
  "polyglot_notebook": {
   "kernelInfo": {
    "defaultKernelName": "csharp",
    "items": [
     {
      "aliases": [
       "c#",
       "C#"
      ],
      "languageName": "C#",
      "name": "csharp"
     },
     {
      "aliases": [],
      "languageName": "SQL",
      "name": "sql"
     },
     {
      "aliases": [
       "frontend"
      ],
      "languageName": null,
      "name": "vscode"
     },
     {
      "aliases": [],
      "languageName": null,
      "name": ".NET"
     },
     {
      "aliases": [
       "f#",
       "F#"
      ],
      "languageName": "F#",
      "name": "fsharp"
     },
     {
      "aliases": [],
      "languageName": "HTML",
      "name": "html"
     },
     {
      "aliases": [],
      "languageName": "KQL",
      "name": "kql"
     },
     {
      "aliases": [],
      "languageName": "Mermaid",
      "name": "mermaid"
     },
     {
      "aliases": [
       "powershell"
      ],
      "languageName": "PowerShell",
      "name": "pwsh"
     },
     {
      "aliases": [],
      "languageName": null,
      "name": "value"
     }
    ]
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
